<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>管理员添加学生</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link rel="stylesheet" type="text/css" href="css/student.css">
<%--<link rel="stylesheet" href="style.css" type="text/css" media="all" />
--%>
<link rel="stylesheet" href="<%=basePath%>css/style.css" type="text/css" media="all" />
<link href="<%=basePath%>css/demo.css" type="text/css" rel="stylesheet" />
</head>

<body>
	<jsp:include page="head.jsp"></jsp:include>
	<div>
		<div id="left">
			<ul>

				<li>
					<h2>
						<a href="<%=basePath%>addStudent.jsp">添加学生</a>
					</h2></li>
				<li>
					<h2>
						<a href="<%=basePath%>deleteStudent.jsp">删除学生</a>
					</h2>
				</li>
				<li>
					<h2>
						<a href="<%=basePath%>showstudent.jsp">查看学生</a>
					</h2>
				</li>

			</ul>
		</div>
		<div id="main">
		<!-- 管理员添加学生 -->
			<form class="registerform" action="admin.action" method="post">
				<ul>
					<li><h2 class="green">添加学生</h2>
					</li>
					<li><font class="word"><s:property value="#request.meg" />
					</font>
					</li>
					<li><label class="label"><span class="need">*&nbsp;&nbsp;</span><font class="word">学号：</font> </label>
					<!--实时验证学号是否存在  -->
					 <input type="text" value="" name="student.id" ajaxurl="checkName.action" class="inputxt" datatype="n12-12" nullmsg="用户名不能为空！" errormsg="学号为12位数字！" /> 
					 <span class="Validform_checktip">请填入12位数字！</span></li>
					<li><label class="label"><span class="need">*&nbsp;&nbsp;</span><font class="word">姓名：</font> </label> <input type="text" value="" name="student.name" class="inputxt" datatype="z2-4" nullmsg="请输入姓名！" errormsg="中文名为2~4个中文字符！" /> <span class="Validform_checktip"></span></li>
					<li><label class="label"><span class="need">*&nbsp;&nbsp;</span><font class="word">性别：</font> </label> <input type="radio" value="男" name="student.sex" class="pr1" checked="checked" /> <label for="男"><font class="word">男</font>
					</label> <input type="radio" value="女" name="student.sex" class="pr1" /> <label for="女"><font class="word">女</font>
					</label>
					<li><label class="label"><span class="need">*&nbsp;&nbsp;</span><font class="word">学院：</font> </label> <select class="input-xlarge" name="student.academy">
							<option value="信息学院">信息学院</option>
							<option value="软件学院">软件学院</option>
							<option value="农学院">农学院</option>
							<option value="林学院">林学院</option>
					</select>
					</li>
					<li><label class="label"><span class="need">*&nbsp;&nbsp;</span><font class="word">专业：</font> </label> <select class="input-xlarge" name="student.major">
							<option value="信息管理与信息系统">信息管理与信息系统</option>
							<option value="工业工程">工业工程</option>
							<option value="网络工程">网络工程</option>
							<option value="测绘工程">测绘工程</option>
					</select>
					</li>
					<li><label class="label"><span class="need">*&nbsp;&nbsp;</span><font class="word">年级：</font> </label> <select class="input-xlarge" name="student.grade">
							<option value="11">11</option>
							<option value="12">12</option>
							<option value="13">13</option>
							<option value="14">14</option>
					</select>
					</li>
					<li><label class="label"><span class="need">*&nbsp;&nbsp;</span><font class="word">班级：</font> </label> <select class="input-xlarge" name="student.theclass">
							<option value="1">1</option>
							<option value="2">2</option>
							<option value="3">3</option>
							<option value="4">4</option>
					</select>
					</li>

					<li><label class="label"><span class="need">*&nbsp;&nbsp;</span><font class="word">联系方式：</font> </label> <input type="text" value="" name="student.phone" class="inputxt" datatype="m" nullmsg="联系方式不能为空！" errormsg="输入电话号码错误！" /> <span class="Validform_checktip">请填入手机号码！</span></li>

					<li><label class="label"><span class="need">*&nbsp;&nbsp;</span><font class="word">电子邮箱：</font> </label> <input type="text" value="" name="student.email" class="inputxt" datatype="e" nullmsg="电子邮箱不能为空！" errormsg="输入邮箱格式错误！" /> <span class="Validform_checktip">请填入电子邮箱号！</span></li>

				</ul>
				<div class="action">
					<input type="submit" value="提 交" />&nbsp;&nbsp;&nbsp; <input type="reset" value="重 置" /> <span id="msgdemo" style="margin-left:30px;"></span>
				</div>
			</form>

		</div>
	</div>
	<hr width=100% size=5 color=#2323fe style="FILTER: alpha(opacity=100,finishopacity=0,style=3)">
	<script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
	<script type="text/javascript" src="js/Validform_v5.3.2.js"></script>
	<script type="text/javascript">
		$(function() {
			//$(".registerform").Validform();  //就这一行代码！;
			$(".registerform").Validform({
				tiptype : 3,
				datatype : {//传入自定义datatype类型【方式二】;
					"z2-4" : /^[\u4E00-\u9FA5\uf900-\ufa2d]{2,4}$/
				}

			});
		})
	</script>
</body>
</html>
